/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：LiuLangWenYing.java <br>
 * 创建时间：2013-8-23 下午8:24:21 <br>
 * 所属项目：GmudEX <br>
 * @author 12548 <br>
 */
package lostland.gmud.exv2.battle.proc.stunt;

import lostland.gmud.exv2.battle.BattleScreen;
import lostland.gmud.exv2.battle.proc.Status;
import lostland.gmud.exv2.data.Item;
import lostland.gmud.exv2.data.Npc;

/**
 * 类名：LiuLangWenYing <br>
 * 说明：18.柳叶刀法·11.柳浪闻莺    11.八卦刀·13/14.八卦刀影掌
 *
 * @author 12548
 */
public class LiuLangWenYing extends Status {


	/**
	 * @param zdp
	 * @param bdp
	 */
	public LiuLangWenYing(Npc zdp, Npc bdp) {
		super(zdp, bdp);
	}

	boolean b = true;
	int round = -1;
	Item t;

	int a = 3;

	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.battle.proc.Status#execute()
	 */
	@Override
	public void execute() {
		round++;
		if (round == 0) {
			if (zdp.skillsckd[0] == 12)
				a = 2;

			String p = "【柳浪闻莺" + (round + 1) + "/3】";
			if (zdp.skillsckd[1] == 11)
				p = "【八卦刀影掌" + (round + 1) + "/" + a + "】";

			BattleScreen.getInstance().atkprocess(zdp, bdp, null, this, p);


//			GmudWorld.bs.push(this);

//			AttackStatus.ag = zdp.cg();
//			GmudWorld.bs.setStatus(new AnotherDummyStatus(new AttackStatus(this)));
//			ViewScreen.setText(GmudWorld.bs.bsp(AttackStatus.ag.c));
//			GmudWorld.game.setScreen(new ViewScreen(GmudWorld.game));
		} else if (round < a) {
			if (b) {
				t = zdp.getAttackItem();
				zdp.unequip(t);
				b = false;
			}


			String p = "【柳浪闻莺" + (round + 1) + "/3】";
			if (zdp.skillsckd[1] == 11)
				p = "【八卦刀影掌" + (round + 1) + "/" + a + "】";

			BattleScreen.getInstance().atkprocess(zdp, bdp, null, this, p);


//			GmudWorld.bs.push(this);

//			AttackStatus.ag = zdp.cg();
//			GmudWorld.bs.setStatus(new AttackStatus(this));
//			ViewScreen.setText(GmudWorld.bs.bsp(AttackStatus.ag.c));
//			GmudWorld.game.setScreen(new ViewScreen(GmudWorld.game));
		} else {
			zdp.setTransfixed(zdp.getDz() + 3);
			if (!zdp.equips(t))
				zdp.equip(t);
		}

	}

}

